package com.site.codegen.disposer;

import com.site.codegen.disposer.impl.ColumnListDisposer;
import com.site.codegen.disposer.impl.DatasourceInfoDisposer;
import com.site.codegen.disposer.impl.TableListDisposer;

public class CommandDisposerFactory {

    public CommandDisposer getCommandDisposer(String type) {
        switch (type) {
            case "10001":
                return new DatasourceInfoDisposer();
            case "10002":
                return new TableListDisposer();
            case "10003":
                return new ColumnListDisposer();
        }
        throw new RuntimeException("Command Type Error!");
    }
}
